package com.kylin.commodity.api.dto.resp;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.kylin.marketing.api.dto.resp.MarketingCampaignRespDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

/**
 * 前端商品详情
 * @author Damon S.
 * @version v1.0.1
 * @date 2020年01月07日 19:31
 */
@Builder
@Data
@ApiModel(value = "商品详情")
public class CommodityRespDTO implements Serializable {

    @ApiModelProperty(value = "商品ID")
    private Long commodityId;

    @ApiModelProperty(value = "商品编码")
    private String code;

    @ApiModelProperty(value = "商品名称")
    private String title;

    @ApiModelProperty(value = "副标题")
    private String subtitle;

    @ApiModelProperty(value = "封面图片")
    private String cover;

    @ApiModelProperty(value = "商品库存")
    private Integer inventory;

    @ApiModelProperty(value = "价格(分)")
    private Long price;

    @ApiModelProperty(value = "商户ID")
    private Long merchantId;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @ApiModelProperty(value = "评论总数")
    private Long commentTotal;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @ApiModelProperty(value = "一条评论")
    private CommentRespDTO comment;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @ApiModelProperty(value = "营销属性")
    private MarketingCampaignRespDTO campaign;
}
